package cn.lijiguo.logs.log4j2;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.Test;

/**
 * log4j2 API
 * @author lijiguo
 */
public class Log4J2Test {

    // 获取日志记录器对象
    private static final Logger logger = LogManager.getLogger(Log4J2Test.class);

    @Test
    public void testQuick() {
        // 输出日志
        logger.fatal("fatal");
        logger.error("error"); // 默认级别
        logger.warn("warn");
        logger.info("info");
        logger.debug("debug");
        logger.trace("trace");
    }
}
